<template>
<!--  <div class="van-hairline&#45;&#45;surround" v-model="memberEducation" @load="onLoad">-->
<!--    <h2>{{memberEducation.tittle}}</h2>-->
<!--  </div>-->
  <div>
    <van-nav-bar title="文章详情" left-text="返回"  left-arrow @click-left="onClickLeft"
                 @click-right="onClickRight" />
    <div id="header" style="width: 100%;height:auto ; border: 1px solid silver;border-radius: 20px;">
      <div id="title">
        <h3>{{this.memberEducation.tittle}}</h3>
        <div>
          <span>来源:{{this.memberEducation.departmentinfo.departmentName}}</span><br />
          <span>发布时间:{{this.memberEducation.releaseTime}}</span>
        </div>
      </div>
    </div>
    <div id="body" style=" padding: 20px;">
      <span style="line-height: 30px;">
        {{this.memberEducation.content}}
      </span>
    </div>
  </div>
</template>

<script>
export default {
  name: "education_info",
  data() {
    return {
      id:'',
      memberEducation:{
        id:'',
        tittle:'',
        releaseTime:'',
        content:'',
        readNumber:'',
        thumbNumber:'',
        collectNumber:'',
        userId:'',
        departmentinfo: {
          departmentId:'',
          departmentName:'',
          departmentManager:'',
          departmentFlag:'',
          departmentTelephone:'',
        },
      },
    }
  },
  methods: {
    onLoad(){
        this.$axios.get("http://localhost:7000/education/queryById/"+this.id).then(res => {
          this.memberEducation = res.data.data;
        });
    },
    onClickLeft() {
      this.$router.go(-1)
    },
  },mounted() {
    this.id = this.$route.params.id;
    this.onLoad();
  }
}
</script>

<style scoped>

</style>